
//退出登录
function logout(){
    if(confirm("确认注销？")){
        jQuery.ajax({
            url:"/art/logout",
            type:"POST",
            data:{},
            success:function(result){
                if(result!=null && result.code == 200){
                    location.href = "/login.html";
                }
            }
        });
    }
}

    // 获取当前url的公共方法
    function getUrlValue(key){
        // ?id=1&v=2
        var params = location.search;
        if(params.length > 1){
            // id=1&v=2
            params = location.search.substring(1);
            var paramArr = params.split("&");

            for(var i=0;i<paramArr.length;i++){
                var kv = paramArr[i].split("=");
                if(kv[0] == key){
                    //是我要查询的参数
                    return kv[1];
                }
            }
        }
    return "";
}



